#ifndef YXRESULT_H
#define YXRESULT_H

#include "../common/YXJSON.h"

#define YXResult cJSON

#define yxResult_free cJSON_Delete

typedef struct {
  YXResult* (*successWithMsg)(const char* msg, yxObject* data);
  YXResult* (*success)(yxObject* data);
  YXResult* (*error)(const char* msg);
} ResultUtils;

extern ResultUtils YXResultUtils;

#endif //YXRESULT_H
